import { createApp } from 'vue';
import './style.css'
import Echarts from 'vue-echarts'
import * as echarts from 'echarts'
import router from '@/router/router.js';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import {createPinia} from 'pinia';

import App from './App.vue';

const pinia = createPinia()
const app = createApp(App);
app.use(router);
app.component('e-charts',Echarts);
app.config.globalProperties.$echarts = echarts;
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn,
  });   
app.use(pinia)                 
app.mount('#app');